<c:if xmlns:c="http://java.sun.com/jstl/core"
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:nxu="http://nuxeo.org/nxweb/util"
  xmlns:nxh="http://nuxeo.org/nxweb/html"
  xmlns:nxd="http://nuxeo.org/nxweb/document"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:a4j="http://richfaces.org/a4j"
  test="#{contentView != null}">

<c:if test="false">
Needed parameters:
 - contentView: the content view instance, mandatory
 - contentViewRenderId the unique identifier used in main
   content view template

Optional parameters used to override the content view definition when not
empty:
 - showPageSizeSelector
</c:if>

    #{contentViewActions.setCurrentContentView(contentView)}
    <c:if test="#{contentView.useGlobalPageSize}">
      <c:set var="pageSizeBinding" value="#{contentViewActions.currentGlobalPageSize}" />
    </c:if>
    <c:if test="#{not contentView.useGlobalPageSize}">
      <c:set var="pageSizeBinding" value="#{contentView.currentPageSize}" />
    </c:if>

    <span class="contentViewUpperAction">
      <h:form id="#{widget.id}">
        <span class="contentViewPageSelectorDesc">
          <h:outputText value="#{messages['label.contentview.pageSize']}" />
        </span>
        <h:selectOneMenu value="#{pageSizeBinding}"
          id="contentViewPageSizeSelector"
          styleClass="langSelect">
          <f:convertNumber />
          <f:selectItems value="#{contentViewActions.getPageSizeOptions(contentView)}" />
          <a4j:ajax execute="@this" render="#{ajaxReRender}" event="change" />
        </h:selectOneMenu>
      </h:form>
    </span>

</c:if>